
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class TargetDuplicateCfg : public ManualSingleton <TargetDuplicateCfg>
{
	friend ManualSingleton <TargetDuplicateCfg>;
public:
	TargetDuplicateCfg();
	~TargetDuplicateCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const TargetDuplicateCfgInfo *GetTargetDuplicateCfgInfo(int32_t id);
	const TargetDuplicateCfgMap *GetTargetDuplicateCfgMap() { return &m_TargetDuplicateCfgMap; }
private:
	TargetDuplicateCfgMap m_TargetDuplicateCfgMap;
};

#define  g_MakeTargetDuplicateCfgTable() (TargetDuplicateCfg::Instance())
#define  g_GetTargetDuplicateCfgTable() (TargetDuplicateCfg::GetInstance())
#define  g_DelTargetDuplicateCfgTable() (TargetDuplicateCfg::Destroy())